package com.tanhan.mindapp.dao;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tanhan.mindapp.dao.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@TableName("sys_menu")
@Schema(description = "系统菜单实体类")
public class SysMenu extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 菜单名称
    @TableField("menu_name")
    @Schema(description = "菜单名称", example = "用户管理")
    private String menuName;

    // 父菜单ID
    @TableField("parent_id")
    @Schema(description = "父菜单ID", example = "0")
    private String parentId;

    // 显示顺序
    @TableField("order_num")
    @Schema(description = "显示顺序", example = "1")
    private Integer orderNum;

    // 路由地址
    @TableField("path")
    @Schema(description = "路由地址", example = "/system/user")
    private String path;

    // 组件路径
    @TableField("component")
    @Schema(description = "组件路径", example = "system/user/index")
    private String component;

    // 路由参数
    @TableField("query")
    @Schema(description = "路由参数", example = "status=1")
    private String query;

    // 是否为外链（0是 1否）
    @TableField("is_frame")
    @Schema(description = "是否为外链", example = "1", allowableValues = {"0", "1"})
    private Integer isFrame;

    // 是否缓存（0缓存 1不缓存）
    @TableField("is_cache")
    @Schema(description = "是否缓存", example = "0", allowableValues = {"0", "1"})
    private Integer isCache;

    // 菜单类型（M目录 C菜单 F按钮）
    @TableField("menu_type")
    @Schema(description = "菜单类型", example = "C", allowableValues = {"M", "C", "F"})
    private String menuType;

    // 菜单状态（0显示 1隐藏）
    @TableField("visible")
    @Schema(description = "菜单显示状态", example = "0", allowableValues = {"0", "1"})
    private String visible;

    // 菜单状态（0正常 1停用）
    @TableField("status")
    @Schema(description = "菜单状态", example = "0", allowableValues = {"0", "1"})
    private String status;

    // 权限标识
    @TableField("perms")
    @Schema(description = "权限标识", example = "system:user:list")
    private String perms;

    // 菜单图标
    @TableField("icon")
    @Schema(description = "菜单图标", example = "#")
    private String icon;
}
